<!--
  ~ Copyright 2017, OpenSkywalking Organization All rights reserved.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~
  ~ Project repository: https://github.com/OpenSkywalking/skywalking-ui
  -->

<div id="entryServiceListVueDiv">
    <table class="table table-striped">
        <thead>
        <tr>
            <th>Entry Service name</th>
            <th>Application Code</th>
        </tr>
        </thead>
        <tbody>
        <template v-for="entryService in list">
            <tr v-if="entryService.entryServiceId != 0" v-on:click="idItemClick(entryService.entryServiceId,$event)">
                <td>{{entryService.entryServiceName}}</td>
                <td>{{entryService.applicationCode}}</td>
            </tr>
            <tr v-if="entryService.entryServiceId == 0"
                v-on:click="nameItemClick(entryService.applicationId, entryService.entryServiceName, $event)">
                <td>{{entryService.entryServiceName}}</td>
                <td>{{entryService.applicationCode}}</td>
            </tr>
        </template>
        </tbody>
    </table>
    <div class="text-center">
        <div class="btn-group">
            <button class="btn btn-white" type="button" v-on:click="gotoPage(currentPage - 1)"
                    v-if="hasForward"><i
                    class="fa fa-chevron-left"></i></button>
            <button class="btn btn-white" type="button" disabled="true" v-if="!hasForward"><i
                    class="fa fa-chevron-left"></i></button>
            <button class="btn btn-white">{{currentPage + 1}}</button>

            <button class="btn btn-white" type="button" v-on:click="gotoPage(currentPage + 1)" v-if="backward"><i
                    class="fa fa-chevron-right"></i></button>
            <button class="btn btn-white" type="button" disabled="true" v-if="!backward"><i
                    class="fa fa-chevron-right"></i></button>
        </div>
    </div>
</div>